package common.database.interfaces;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.jdbc.core.SqlParameter;

import common.database.bean.Page;

public interface BaseDAO<T> {
	
	public int update(String namedSql, Object javaBean)throws Exception;

	public int commonUpdate(String sql, Object... paramValue)throws Exception;
	
	public int commonUpdate(String sql, List<T> paramList)throws Exception;
	
	public int[] batchUpdate(String sql, List<T> paramList)throws Exception;

	public T getJavaBean(String sql, Class<T> returnType, Object... paramValue)throws Exception;

	public List<T> getList(String sql, Class<T> returnType, Object... paramValue)throws Exception;



	public int getCount(String countSQL, List paramValue)throws Exception;

	public int getCount(String countSQL, Object... paramValue)throws Exception;

	public Page getListByPage(String sql, Page page, Class<T> returnType,Object... values)throws Exception;
	
	public Map<?, ?> executeStroeProcedure(String procedureName,
			SqlParameter[] procedureParameters, Object... parameterValues)throws Exception;
	
	public String monitor() throws SQLException ;

}
